<%@page import="java.util.Date"%>
<%@ page session="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<jsp:include page="../cabecera_home.jsp"></jsp:include>

<div class="marquesina_index" align="center">

	<br> <br> <br> <b class="titulo2">Reporte de
		Interesados</b> <br> <br>



	<div class="marco_publicacion" align="left">

		<b class="publicacion_titulo">Stocks - Detalle</b> <br>
		<hr>

		<form:form modelAttribute="stock" action="#" method="post">

			<form:input type="hidden" path="id" />

			<fmt:formatDate value="${stock.fechaVenta}" pattern="MM/dd/yyyy"
				timeZone="GMT" />
				
			<table>
				<caption>Detalle de Stock #${stock.id}</caption>
				<thead>
					<tr>
						<th scope="col">Variedad</th>
						<th scope="col">Color</th>
						<th scope="col">PH</th>
						<th scope="col">NTU</th>
						<th scope="col">Acidez</th>
						<th scope="col">Alcohol</th>
						<th scope="col">Azucar</th>
						<th scope="col">Edad</th>
						<th scope="col">Cantidad</th>
						<th scope="col">Precio</th>
						<th scope="col">Creado</th>
						<th scope="col">Estado</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<th scope="row">${stock.variedad}</th>
						<td scope="row">${stock.color}</td>
						<td scope="row">${stock.ph}</td>
						<td scope="row">${stock.ntu}</td>
						<td scope="row">${stock.acidez}</td>
						<td scope="row">${stock.alcohol}</td>
						<td scope="row">${stock.azucar}</td>
						<td scope="row">${stock.edad}</td>
						<td scope="row">${stock.cantidad} L.</td>
						<td scope="row">$ ${stock.precio}</td>
						<td scope="row"><fmt:formatDate
								value="${stock.fechaCreacionStock}" pattern="MM/dd/yyyy"
								timeZone="GMT" /></td>
						<c:choose>
							<c:when test='${stock.fechaVenta != null}'>
								<td scope="row"><span style="color: red;">Vendido el
										<fmt:formatDate value="${stock.fechaVenta}"
											pattern="MM/dd/yyyy" timeZone="GMT" />
								</span></td>
							</c:when>
							<c:otherwise>
								<td scope="row"><span style="color: green;">Disponible</span></td>
							</c:otherwise>
						</c:choose>
					</tr>
				</tbody>

			</table>
			<br>
			<b>Registro INV:</b> #${stock.idINV}<br>
			<input type="text" id="idstockhide" value="${stock.id}" hidden="true">
			<b>Vencimiento:</b>
			<fmt:formatDate value="${stock.vencimiento}" pattern="MM/dd/yyyy"
				timeZone="GMT" />
			<br>
	</div>
	</form:form>
</div>

<br>
</div>

<jsp:include page="../pie_de_pagina_compartida.jsp"></jsp:include>

